package main

import (
	"fmt"
	"regexp"
	"strconv"
)

const (
	DB_REGEXP  = `iot_basic_data\.\w+`
	DB_REPLACE = "${1}"
)

func ShareDbCheck(sql string) {

	reg := regexp.MustCompile(DB_REGEXP)
	replase := DB_REPLACE + "_" + strconv.Itoa(1) + "_" + strconv.Itoa(1)
	allString := reg.ReplaceAllString(sql, replase)
	fmt.Printf(allString)
}
func main() {
	ShareDbCheck("select * from iot_basic_data.pcs where 1=1")
}
